home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / button / buttons.frm < prev    next >
Text File  |  1995-09-06  |  10KB  |  331 lines

  1. VERSION 2.00
  2. Begin Form Buttons 
  3.    Caption         =   "Buttons"
  4.    ClientHeight    =   2535
  5.    ClientLeft      =   2430
  6.    ClientTop       =   1830
  7.    ClientWidth     =   5340
  8.    Height          =   2940
  9.    Icon            =   BUTTONS.FRX:0000
  10.    Left            =   2370
  11.    LinkMode        =   1  'Source
  12.    LinkTopic       =   "Form1"
  13.    ScaleHeight     =   2535
  14.    ScaleWidth      =   5340
  15.    Top             =   1485
  16.    Width           =   5460
  17.    Begin PictureBox ButtonGreen 
  18.       BorderStyle     =   0  'None
  19.       Height          =   372
  20.       Left            =   4320
  21.       Picture         =   BUTTONS.FRX:0302
  22.       ScaleHeight     =   375
  23.       ScaleWidth      =   855
  24.       TabIndex        =   9
  25.       TabStop         =   0   'False
  26.       Top             =   3120
  27.       Visible         =   0   'False
  28.       Width           =   852
  29.    End
  30.    Begin PictureBox ButtonBlue 
  31.       BorderStyle     =   0  'None
  32.       Height          =   372
  33.       Left            =   3480
  34.       Picture         =   BUTTONS.FRX:07B4
  35.       ScaleHeight     =   375
  36.       ScaleWidth      =   855
  37.       TabIndex        =   8
  38.       TabStop         =   0   'False
  39.       Top             =   3120
  40.       Visible         =   0   'False
  41.       Width           =   852
  42.    End
  43.    Begin PictureBox ButtonRed 
  44.       BorderStyle     =   0  'None
  45.       Height          =   375
  46.       Left            =   2640
  47.       Picture         =   BUTTONS.FRX:0C66
  48.       ScaleHeight     =   375
  49.       ScaleWidth      =   855
  50.       TabIndex        =   7
  51.       TabStop         =   0   'False
  52.       Top             =   3135
  53.       Visible         =   0   'False
  54.       Width           =   855
  55.    End
  56.    Begin PictureBox ButtonDown 
  57.       BorderStyle     =   0  'None
  58.       Height          =   372
  59.       Left            =   1800
  60.       Picture         =   BUTTONS.FRX:1118
  61.       ScaleHeight     =   375
  62.       ScaleWidth      =   855
  63.       TabIndex        =   6
  64.       TabStop         =   0   'False
  65.       Top             =   3120
  66.       Visible         =   0   'False
  67.       Width           =   852
  68.    End
  69.    Begin PictureBox ButtonUp 
  70.       BorderStyle     =   0  'None
  71.       Height          =   372
  72.       Left            =   120
  73.       Picture         =   BUTTONS.FRX:15CA
  74.       ScaleHeight     =   375
  75.       ScaleWidth      =   855
  76.       TabIndex        =   4
  77.       TabStop         =   0   'False
  78.       Top             =   3120
  79.       Visible         =   0   'False
  80.       Width           =   852
  81.    End
  82.    Begin PictureBox ButtonGreenFocus 
  83.       BorderStyle     =   0  'None
  84.       Height          =   372
  85.       Left            =   4320
  86.       Picture         =   BUTTONS.FRX:1A7C
  87.       ScaleHeight     =   375
  88.       ScaleWidth      =   855
  89.       TabIndex        =   16
  90.       TabStop         =   0   'False
  91.       Top             =   2760
  92.       Visible         =   0   'False
  93.       Width           =   852
  94.    End
  95.    Begin PictureBox ButtonBlueFocus 
  96.       BorderStyle     =   0  'None
  97.       Height          =   372
  98.       Left            =   3480
  99.       Picture         =   BUTTONS.FRX:1F2E
  100.       ScaleHeight     =   375
  101.       ScaleWidth      =   855
  102.       TabIndex        =   17
  103.       TabStop         =   0   'False
  104.       Top             =   2760
  105.       Visible         =   0   'False
  106.       Width           =   852
  107.    End
  108.    Begin PictureBox ButtonRedFocus 
  109.       BorderStyle     =   0  'None
  110.       Height          =   372
  111.       Left            =   2640
  112.       Picture         =   BUTTONS.FRX:23E0
  113.       ScaleHeight     =   375
  114.       ScaleWidth      =   855
  115.       TabIndex        =   18
  116.       TabStop         =   0   'False
  117.       Top             =   2760
  118.       Visible         =   0   'False
  119.       Width           =   852
  120.    End
  121.    Begin PictureBox ButtonDownFocus 
  122.       BorderStyle     =   0  'None
  123.       Height          =   372
  124.       Left            =   1800
  125.       Picture         =   BUTTONS.FRX:2892
  126.       ScaleHeight     =   375
  127.       ScaleWidth      =   855
  128.       TabIndex        =   15
  129.       TabStop         =   0   'False
  130.       Top             =   2760
  131.       Visible         =   0   'False
  132.       Width           =   852
  133.    End
  134.    Begin PictureBox ButtonFlat 
  135.       BorderStyle     =   0  'None
  136.       Height          =   372
  137.       Left            =   960
  138.       Picture         =   BUTTONS.FRX:2D44
  139.       ScaleHeight     =   375
  140.       ScaleWidth      =   855
  141.       TabIndex        =   5
  142.       TabStop         =   0   'False
  143.       Top             =   2760
  144.       Visible         =   0   'False
  145.       Width           =   852
  146.    End
  147.    Begin PictureBox ButtonUpFocus 
  148.       BorderStyle     =   0  'None
  149.       Height          =   372
  150.       Left            =   120
  151.       Picture         =   BUTTONS.FRX:31F6
  152.       ScaleHeight     =   375
  153.       ScaleWidth      =   855
  154.       TabIndex        =   14
  155.       TabStop         =   0   'False
  156.       Top             =   2760
  157.       Visible         =   0   'False
  158.       Width           =   852
  159.    End
  160.    Begin PictureBox Button3 
  161.       AutoSize        =   -1  'True
  162.       BorderStyle     =   0  'None
  163.       Height          =   450
  164.       Left            =   240
  165.       Picture         =   BUTTONS.FRX:36A8
  166.       ScaleHeight     =   450
  167.       ScaleWidth      =   1050
  168.       TabIndex        =   3
  169.       Top             =   1920
  170.       Width           =   1050
  171.    End
  172.    Begin PictureBox Button2 
  173.       AutoSize        =   -1  'True
  174.       BorderStyle     =   0  'None
  175.       Height          =   450
  176.       Left            =   240
  177.       Picture         =   BUTTONS.FRX:3B5A
  178.       ScaleHeight     =   450
  179.       ScaleWidth      =   1050
  180.       TabIndex        =   2
  181.       Top             =   1440
  182.       Width           =   1050
  183.    End
  184.    Begin PictureBox Button1 
  185.       AutoSize        =   -1  'True
  186.       BorderStyle     =   0  'None
  187.       Height          =   450
  188.       Left            =   240
  189.       Picture         =   BUTTONS.FRX:400C
  190.       ScaleHeight     =   450
  191.       ScaleWidth      =   1050
  192.       TabIndex        =   1
  193.       Top             =   960
  194.       Width           =   1050
  195.    End
  196.    Begin CommandButton Button0 
  197.       Height          =   450
  198.       Left            =   240
  199.       TabIndex        =   0
  200.       Top             =   480
  201.       Width           =   1050
  202.    End
  203.    Begin Label Label6 
  204.       Caption         =   "Button 3 - Picture 3 State Button"
  205.       Height          =   255
  206.       Left            =   1770
  207.       TabIndex        =   13
  208.       Top             =   1950
  209.       Width           =   3255
  210.    End
  211.    Begin Label Label5 
  212.       Caption         =   "Button 2 - Picture 2 State Button"
  213.       Height          =   255
  214.       Left            =   1800
  215.       TabIndex        =   12
  216.       Top             =   1500
  217.       Width           =   3255
  218.    End
  219.    Begin Label Label4 
  220.       Caption         =   "Button 1 - Picture 1 State Button"
  221.       Height          =   255
  222.       Left            =   1800
  223.       TabIndex        =   11
  224.       Top             =   1050
  225.       Width           =   3255
  226.    End
  227.    Begin Label Label3 
  228.       Caption         =   "Button 0 - Real Button"
  229.       Height          =   255
  230.       Left            =   1800
  231.       TabIndex        =   10
  232.       Top             =   600
  233.       Width           =   3255
  234.    End
  235. End
  236.  
  237. Sub Button1_GotFocus ()
  238.     Button1.Picture = ButtonUpFocus.Picture
  239. End Sub
  240.  
  241. Sub Button1_LostFocus ()
  242.     Button1.Picture = ButtonUp.Picture
  243. End Sub
  244.  
  245. Sub Button1_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
  246.     Button1.Picture = ButtonFlat.Picture
  247. End Sub
  248.  
  249. Sub Button1_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single)
  250.     Button1.Picture = ButtonUpFocus.Picture
  251. End Sub
  252.  
  253. Sub Button2_Click ()
  254.     If Button2.Picture = ButtonUpFocus.Picture Then
  255.         Button2.Picture = ButtonDownFocus.Picture
  256.     Else
  257.         Button2.Picture = ButtonUpFocus.Picture
  258.     End If
  259. End Sub
  260.  
  261. Sub Button2_GotFocus ()
  262.     If Button2.Picture = ButtonUp.Picture Then
  263.         Button2.Picture = ButtonUpFocus.Picture
  264.     ElseIf Button2.Picture = ButtonDown.Picture Then
  265.         B